feat: paginate sandboxes list and cover paused + running states#448
Merged
Conversation
Migrate the sandboxes list page from the legacy running-only GET /sandboxes to GET /v2/sandboxes with state=[running,paused] and cursor pagination (X-Next-Token). The list now infinite-scrolls, shows a State column, and renders allocated specs instead of the live per-row metrics overlay (removed). EN-1030
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Order: Started At · Instance · State · Template · CPU · Memory · Disk · Metadata. Move Started At to the first (sort) column, rename the ID column to Instance, and move State up next to Instance.
Restore the per-row live-metrics overlay (from /sandboxes/metrics) for running sandboxes. Paused sandboxes have no live metrics, so they fall back to their allocated specs. Metrics are only requested for running visible rows.
Narrow the State column (badge-sized), and render Started At with tabular (non-mono) figures so the timezone offset (e.g. GMT+2) fits within the fixed-width column instead of being clipped.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0957ee325a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
drankou
reviewed
Jun 24, 2026
Revert legacy sandbox list to the non-paginated /sandboxes endpoint and route the new flag-gated list through a dedicated listSandboxesPaginated procedure backed by /v2/sandboxes.
…pagination-state # Conflicts: # src/core/modules/feature-flags/definitions.ts # tests/unit/feature-flags.test.ts
drankou
approved these changes
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Reworks the sandboxes list page (
/dashboard/[teamSlug]/sandboxes/list) to address EN-1030:GET /sandboxestoGET /v2/sandboxeswithstate=[running, paused], so the list now shows both paused and running sandboxes. A new State column renders a running/paused badge.getSandboxesis now a cursor-based infinite query (limit+nextToken, reading the next cursor from theX-Next-Tokenresponse header). The table infinite-scrolls (prefetch-on-scroll + a Load more fallback), mirroring the existing templates list.use-sandboxes-metrics,metrics-store, thegetSandboxesMetricstRPC query + repository method,transformMetricsToClientMetrics, and the mock-metrics generator) is removed.